﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GalacticLib;
using System.IO;
using System.Threading;


namespace DataRunProcessorConsole
{
    class Program 
    {

        static DataRunProcessor Processor;

        static ClientUi ClientUi;
        static void Main(string[] args)
        {

            ClientUi = new ClientUi();
            string config = File.ReadAllText("GalacticClientConfig.xml");
            Processor = new DataRunProcessor(config);//, ClientUi);
            ClientUi.Processor = Processor;


            if (!Processor.Processing) Processor.Start();

            Processor.OutputEvent += Output;

            while(Processor.Processing)
            {
                Thread.Sleep(2000);
            }

            Console.WriteLine("End of Main()");
         
        }

        static void Output(string s)
        {
            Console.WriteLine(s);
        }

        public void NoPendingRuns()
        {
             
        }

        public void StartingRun(DataRunRequest req)
        {
            
        }
    }
}
